<p>Shadowing fields with a local variable is a bad practice that reduces code readability: it makes it confusing to know whether the field or the
variable is being used.</p>
<h2>Noncompliant Code Example</h2>
<pre>
class Foo {
  public int myField;

  public void doSomething() {
    int myField = 0;
    ...
  }
}
</pre>
<h2>See</h2>
<ul>
  <li> <a href="https://www.securecoding.cert.org/confluence/x/2ADEAw">CERT, DCL51-J.</a> - Do not shadow or obscure identifiers in subscopes </li>
</ul>

